import React from "react";
import { NavLink, Outlet } from "react-router-dom";

export default function Home() {
  return (
    <div className="panel">
      <div className="panel-body">
        <h3>我是Home的内容</h3>
        <hr />
        <div>
          <ul className="nav nav-tabs">
            <li>
              <NavLink to="/home/news" className='list-group-item'>News</NavLink>
            </li>
            <li>
              <NavLink to="/home/message" className='list-group-item'>Message</NavLink>
            </li>
          </ul>
          <hr />
          {/* 内容的切换显示区域 */}
          {/* Outlet 用来渲染二级路由组件 */}
          <Outlet />
        </div>
      </div>
    </div>
  );
}
